package cloud.xlh.my_system.config;

import cloud.xlh.my_system.paramresolver.UserInfoParamResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/1/18 22:26
 * @ Description:
 */
@Configuration
public class MvcConfiguration implements WebMvcConfigurer {
    @Autowired
    private UserInfoParamResolver userInfoParamResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(userInfoParamResolver);
    }
}
